<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddColumnLockedByForContentItem extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('content_item', function (Blueprint $table) {
            $table->bigInteger('locked_by', false, true)->default(0)->after('enable_end')->comment('被管理员锁定');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('content_item', function (Blueprint $table) {
            $table->dropColumn('locked_by');
        });
    }
}
